import React, {PropsWithChildren} from 'react'
import {Form, Input, TextArea} from "@nutui/nutui-react-taro";
import PickerFormItem from "./PickerFormItem";
import {Category, homeApplianceBrands} from "../apis/OrderApi";

export interface OrderGoodsInfoFormItemsProps extends PropsWithChildren {
    categories:Category[]
    brands:string[]
}

const OrderGoodsInfoFormItems: React.FC<OrderGoodsInfoFormItemsProps> = ({categories,brands}) => {
    return <>
        <Form.Item label={"型号"} name={"model"}>
            <Input/>
        </Form.Item>
        <Form.Item label={"序列号"} name={"serialNumber"}>
            <TextArea rows={2}/>
        </Form.Item>
        <PickerFormItem label={"类别"} required name={"category"}
                        options={categories.map(it => ({value: it, text: it}))}/>
        <PickerFormItem required label={"品牌"} name={"brand"}
                        options={brands.map(it => ({value: it, text: it}))}/>
        <Form.Item label={"条码(69码)"} name={"barcode"}>
            <Input/>
        </Form.Item>
    </>
}

export default OrderGoodsInfoFormItems


